#include<bits/stdc++.h>
#define int long long
#define ld long double
#define N 1000005
using namespace std;
int n,k;
int a[N],b[N];
ld p[N],f[N][2],g[N][3];
ld ans=1;
signed main(){
    freopen("sleep.in","r",stdin);
    freopen("sleep.out","w",stdout);
    scanf("%lld %lld",&n,&k);
    for(int i=1;i<=n;i++) scanf("%lld %lld",&a[i],&b[i]),p[i]=(ld)1-(ld)a[i]/b[i];
    sort(p+1,p+n+1);
    f[0][0]=1;
    for(int i=1;i<=n;i++){
        f[i][0]=f[i-1][0]*(1-p[i]);
        f[i][1]=f[i-1][0]*p[i]+f[i-1][1]*p[i];
    }
    g[n+1][0]=g[n+1][2]=1;
    for(int i=n;i>=1;i--){
        g[i][0]=(1-p[i])*g[i+1][0];
        g[i][1]=(1-p[i])*g[i+1][1]+p[i]*g[i+1][2];
        g[i][2]=p[i]*g[i+1][2];
    }
    for(int i=0;i<=k;i++) ans=min(ans,(ld)1-f[i][0]*g[n-k+i+1][0]-f[i][0]*g[n-k+i+1][1]-f[i][1]*g[n-k+i+1][2]);
    printf("%.12Lf\n",ans);
    return 0;
}